-
Notifications
You must be signed in to change notification settings - Fork 880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor of docker PR #11405 #336
Conversation
//Gets the IP version in use ( [ipv4], [ipv6] or [ipv4 and ipv6] ) | ||
func getIPVersion(config *networkConfiguration) ipVersion { | ||
ipVersion := ipv4 | ||
if config.FixedCIDR != nil || config.EnableIPv6 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be FixedCIDRv6 ?
68d1fc4
to
842f2e3
Compare
@aboch Thanks for looking this over. I just made both of the changes that you suggested. |
842f2e3
to
11a8885
Compare
I just realized in docker/docker PR #11405 @minimar also added some test code. Could you please port that one as well, so we do not leave anything out. Thanks. |
11a8885
to
addb20d
Compare
Sure -- the test has been included now. |
Thanks for porting the patch to libnetwork. LGTM |
Any chance somebody could merge this in? |
if err != nil { | ||
if ptherr, ok := err.(*os.PathError); ok { | ||
if errno, ok := ptherr.Err.(syscall.Errno); ok && errno == syscall.ENOENT { | ||
if netutils.IsRunningInContainer() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IsRunningInContainer
cannot be reliably used outside libnetwork test framework. This needs special environment variables to be set up and this is not going to work when libnetwork is used in docker. So this part of the code needs to be redesigned so that this function works everywhere.
f23b441
to
0e373fc
Compare
Signed-off-by: Alec Benson <albenson@redhat.com>
0e373fc
to
ec88bd0
Compare
@mrjana |
Thanks @alecbenson. LGTM now |
This is a port of docker PR #11405 code into the libnetwork codebase.
It will solve docker issue #11404.
Signed-off-by: Alec Benson albenson@redhat.com